import { lazy } from 'react'
import {
  HomeOutlined,
  PictureOutlined,
  MenuOutlined
} from '@ant-design/icons';
const routes = [

  {
    key: '0-0',
    path: '/',
    title: '系统首页',
    icon: <HomeOutlined />,
    component: lazy(() => import('./../views/home/Index.jsx'))
  },
  {
    key: '0-1',
    path: '/banner',
    title: '轮播图管理',
    icon: <PictureOutlined />,
    redirect: '/banner/list',
    children: [
      {
        key: '0-1-0',
        path: '/banner/list',
        title: '轮播图列表',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/banner/Index.jsx'))
      },
      {
        key: '0-1-1',
        path: '/banner/add',
        title: '添加轮播图',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/banner/Add.jsx')),
        hidden: true
      }
    ]
  },
  {
    key: '0-2',
    path: '/pro',
    title: '产品管理',
    icon: <PictureOutlined />,
    redirect: '/pro/list',
    children: [
      {
        key: '0-2-0',
        path: '/pro/list',
        title: '产品列表',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/pro/Index.jsx'))
      },
      {
        key: '0-2-1',
        path: '/pro/seckill',
        title: '秒杀列表',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/pro/SecKill.jsx'))
      },
      {
        key: '0-2-2',
        path: '/pro/recommend',
        title: '推荐列表',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/pro/Recommend.jsx'))
      },
      {
        key: '0-2-3',
        path: '/pro/search',
        title: '筛选列表',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/pro/Search.jsx'))
      }
    ]
  },
  {
    key: '0-3',
    path: '/user',
    title: '账户管理',
    icon: <PictureOutlined />,
    redirect: '/user/list',
    children: [
      {
        key: '0-3-0',
        path: '/user/list',
        title: '用户列表',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/user/Index.jsx'))
      },
      {
        key: '0-3-1',
        path: '/user/admin',
        title: '管理员列表',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/user/Admin.jsx'))
      }
    ]
  },
  {
    key: '0-4',
    path: '/data',
    redirect: '/data/echarts',
    title: '数据可视化',
    icon: <PictureOutlined />,
    children: [
      {
        path: '/data/echarts',
        title: "ECHARTS",
        key: '0-4-0',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/data/Echarts.jsx'))
      },
      {
        path: '/data/g2',
        title: "G2",
        key: '0-4-1',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/data/G2.jsx'))
      },
      {
        path: '/data/antDesignChart',
        title: "antDesignChart",
        key: '0-4-2',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/data/AntDesignChart.jsx'))
      },
    ]
  },
  {
    key: '0-5',
    path: '/text',
    redirect: '/text/Markdown',
    title: '文本文档',
    icon: <PictureOutlined />,
    children: [
      {
        path: '/text/Markdown',
        title: "Markdown",
        key: '0-5-0',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/text/Markdown.jsx'))
      },
      {
        path: '/text/Word',
        title: "富文本编辑器",
        key: '0-5-1',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/text/Word.jsx'))
      }
    ]
  },
  {
    key: '0-6',
    path: '/excel',
    redirect: '/excel/import',
    title: '表格导出导入',
    icon: <PictureOutlined />,
    children: [
      {
        path: '/excel/import',
        title: "Import",
        key: '0-6-0',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/excel/import.jsx'))
      },
      {
        path: '/excel/export',
        title: "export",
        key: '0-6-1',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/excel/export.jsx'))
      }
    ]
  },
  {
    key: '0-7',
    path: '/map',
    redirect: '/map/baidu',
    title: '地图',
    icon: <PictureOutlined />,
    children: [
      {
        path: '/map/bmap',
        title: "百度地图",
        key: '0-7-0',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/map/bmap.jsx'))
      },
      {
        path: '/map/amap',
        title: "高德地图",
        key: '0-7-1',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/map/amap.jsx'))
      },
      {
        path: '/map/tmap',
        title: "腾讯地图",
        key: '0-7-2',
        icon: <MenuOutlined />,
        component: lazy(() => import('./../views/map/tmap.jsx'))
      }
    ]
  },
  {
    key: '0-8',
    path: '/setting',
    title: '设置',
    icon: <HomeOutlined />,
    component: lazy(() => import('./../views/setting/Index.jsx')),
    hidden: true
  }
]

export default routes